package com.sm.appbase.example.ui;

import com.shuoyue.appbase.R;
import com.sm.appbase.base.basemvp.BaseMvpActivity;
import com.sm.appbase.example.UserInfo;

public class ExampActivity extends BaseMvpActivity<ExampContract.Presenter> implements ExampContract.View {


    @Override
    protected int getLayoutId() {
        return R.layout.activity_examp;
    }

    @Override
    protected void initView() {

    }

    @Override
    public void initData() {
        super.initData();
        //这里初始化Presenter
        mPresenter = new ExampContract.Presenter();
        mPresenter.attachView(this);

        //使用presenter请求数据
        mPresenter.login("username","password");

    }

    @Override
    public void loginResultSuc(UserInfo object) {
        //处理返回逻辑，这个方法是ExampContract的View中的方法
    }
}
